\documentclass[12pt]{article}

\usepackage[english]{babel}
\usepackage{array}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{graphicx}
\usepackage{pdfpages}
\usepackage{fancyhdr}
\usepackage{amsmath}
\usepackage{setspace}
\usepackage{listings}
\usepackage[normalem]{ulem}
\usepackage[font=footnotesize,format=plain,labelfont=bf,up,textfont=it,up,justification=centering]{caption}
\usepackage[hidelinks]{hyperref}
\usepackage{pdflscape}
\usepackage{colortbl}
\setlength{\textwidth}{481pt} % Largeur de la zone de texte (17cm)
\setlength{\oddsidemargin}{0pt} % Marge gauche sur pages impaires
\setlength{\evensidemargin}{0pt} % Marge gauche sur pages paires
\setlength{\topmargin}{0pt} % Pas de marge en haut
\setlength{\headheight}{12pt} % Haut de page
\setlength{\headsep}{25pt} % Entre le haut de page et le texte
\setlength{\footskip}{30pt} % Bas de page + séparation
\setlength{\textheight}{620pt} % Hauteur de la zone de texte (25cm)
\setlength{\parindent}{0cm}
\setstretch{1.2}

\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{3}
\makeatletter
\newcounter {subsubsubsection}[subsubsection]
\renewcommand\thesubsubsubsection{\thesubsubsection .\@alph\c@subsubsubsection}
\newcommand\subsubsubsection{\@startsection{subsubsubsection}{4}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\normalsize\bfseries}}
\newcommand*\l@subsubsubsection{\@dottedtocline{3}{10.0em}{4.1em}}
\newcommand*{\subsubsubsectionmark}[1]{}
\makeatother

%Page de garde
\makeatletter
\def\clap#1{\hbox to 0pt{\hss #1\hss}}%
\def\ligne#1{%
\hbox to \hsize{%
\vbox{\centering #1}}}%
\def\haut#1#2#3{%
\hbox to \hsize{%
\rlap{\vtop{\raggedright #1}}%
\hss
\clap{\vtop{\centering #2}}%
\hss
\llap{\vtop{\raggedleft #3}}}}%
\def\bas#1#2#3{%
\hbox to \hsize{%
\rlap{\vbox{\raggedright #1}}%
\hss
\clap{\vbox{\centering #2}}%
\hss
\llap{\vbox{\raggedleft #3}}}}%
\def\maketitle{%
\thispagestyle{empty}\vbox to \vsize{%
\haut{}{\@blurb}{}
\vfill
\vspace{1cm}
\begin{flushleft}
%\usefont{OT1}{ptm}{m}{n}
\huge \@title
\end{flushleft}
\par
\hrule height 3pt
\par
\begin{flushright}
%\usefont{OT1}{phv}{m}{n}
\large \@author
\par
\end{flushright}
\vspace{1cm}
\vfill
\vfill
\bas{}{\@location\ - \@date}{}
}%
\cleardoublepage
}
\def\date#1{\def\@date{#1}}
\def\author#1{\def\@author{#1}}
\def\title#1{\def\@title{#1}}
\def\location#1{\def\@location{#1}}
\def\blurb#1{\def\@blurb{#1}}
\date{\today}
\author{}
\title{}
\blurb{}
\makeatother
\title{Project Report\\\Large MeteoCal}
\author{Adrien \textsc{Bestel}\\Jorge \textsc{Vera}\\}
\location{Milano}




\date\today

\begin{document}
\newpage
\begin{figure}[t]
        \includegraphics[height = 20mm]{logo.png}
\end{figure}
\vspace{-15cm}
\maketitle
\thispagestyle{empty}
\newpage
\tableofcontents


\newpage
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0.01mm}
\lhead{\footnotesize Adrien \textsc{Bestel} - Jorge \textsc{Vera}}
\rhead{\footnotesize Project Report - MeteoCal}

\lstset{language=Java}

\section{Introduction}
In this document we use different estimation tools to check how close to the standards is our development. We are going to be using the Function Point approach and check if the actual size of the project is similar to the estimation. And then we are going to use the COCOMO formulas to compare the resulting effort that we registered with this theoretical one.

\vspace{0.5cm}

We used as reference this website, it belongs to the University of Southern California: \\\url{http://sunset.usc.edu/csse/affiliate/private/COCOMOII_2000_3/private!xras=002454QqbIRCapuxio64_Xr71sc983812==1.html}
\vspace{0.5cm}
They have in their resources a COCOMO II calculator that allows you to approximate the effort of the project, obviously they have developed this tool with their own developing data, and as we as a team have not developed to much data to influence the models knowing what we are doing, we are going to assume that as this developed tool is designed for another university, is sort of the same environment so the calculations should be around the same scale.

\newpage
\section{Function Points}
In this section we define each function point based on the function point standard table that shows the amount of function points for each category and different complexity:

\vspace{0.5cm}
\begin{center}
\begin{tabular}{|c|c|c|c|}\hline
Component & Low & Average & High
\\ \hline
External Input & 3 & 4 & 6
\\ \hline
External Output & 4 & 5 & 7
\\ \hline
External Enquiries & 3 & 5 & 6
\\ \hline
External Interfaces & 5 & 7 & 10
\\ \hline
Internal Local File & 7 & 10 & 15
\\ \hline
\end{tabular}

\begin{figure}[ht!]
		\caption{Function Point table}
\end{figure}
\end{center}

\subsection{Internal Logic Files}
We recognized from the RASD document our 4 entities that are the following:
\begin{itemize}
\item User: Is a file where we get all the information about our users like username, password, email, etc. (Low Complexity)
\item Event: All the event data, invited people, owners of the event, place etc. (Low Complexity)
\item Notification: The way to communicate the user what is changing, contains a owner, and an event to relate to. (Low Complexity)
\item Forecast: Is the forecast storage, where we know how is going to be the weather for a location during a time stamp. (Low Complexity)
\end{itemize}
\vspace{0.5cm}
Therefore we got 4 Low Complexity internal files, that adds 28 function points.

\subsection{External Inputs}
We recognized from the RASD document the following:
\begin{itemize}
\item Login/Logout/Register: simple standard user interaction. (Low Complexity)
\item Create/Edit/Delete Event: CRUD properties for events. (Low Complexity)
\item Invite People to Event: Possibility of inviting people while creating an event. (Low Complexity)
\end{itemize}
\vspace{0.5cm}
Therefore we got 7 Low Complexity external inputs, that adds 21 function points.

\subsection{External Inquiries}
We recognized from the RASD document the following:
\begin{itemize}
\item See Profile: Shows the profile page where you can see your next events, the events you are host and also your notifications. (Average Complexity)
\item See Event: Shows the desired event, with respective host and invitees, you can check the forecast for the place and also who is going to the event. (Average Complexity)
\item See People Calendar: Shows the calendar belonging to another user, you can see the timeslots that he or she have occupied but cannot see which event is going. (Average Complexity)
\end{itemize}
\vspace{0.5cm}
Therefore we got 3 Average Complexity external inquiries, that adds 12 function points.

\subsection{External Interfaces}
We recognized from the RASD document the following:
\begin{itemize}
\item Forecast Provider: We have to use an external forecast provider, we need to bring it's data to our system and store it here, we need to use their protocols and then parse the data. (Average Complexity)
\end{itemize}
\vspace{0.5cm}
Therefore we got 1 Average Complexity external interface, that adds 7 function points

\subsection{Calculation}
Finally we can compute the function points gathered, the sum of all the function points is 68. Putting all together in the calculator:

\begin{figure}[ht!]
	\begin{center}
		\includegraphics[width=10cm]{FPD.png}
		\caption{Calculator Data Input}
	\end{center}
\end{figure}

And by the Function Point approach we got an approximation of 3604 source lines of code.

\newpage
\section{COCOMO II}
This approach is based in the end state, calculating how much we should have spent to have done what we did.
\subsection{SLOC Count}
We counted down the lines of source code, not counting obviously the following:
\begin{itemize}
\item Comments.
\item Indentation lines.
\item References.
\end{itemize}
Finally we counted 2120 SLOC.

\subsection{Scale Factors}
As a setup for the scale factors we used the following setup:

\begin{figure}[ht!]
	\begin{center}
		\includegraphics[width=10cm]{SF.png}
		\caption{Scale Factors setup}
	\end{center}
\end{figure}

\begin{itemize}
\item Precedentedness: As we are CS students, and we have been developing software since a few years, we consider our expertice level for this case into "high".
\item Development Flexibility: As we are completely autogestionated, and technically we can work whenever we want, we set up this flexibility to "high".
\item Architecture: As the problem to solve is not high complexity, we assume that the architecture proposed is more than enough to accomplish the objective, therefore we set up this as "high".
\item Team Cohesion: As we just met to joint this team, but we have been working on teams since a few years, we consider the cohesion (potentially) as "nominal".
\item Process Maturity: This is the first software developed by us, but we know good practices of programming and designing, although this factor got a "low" setup.
\end{itemize}

\subsection{Computation}
As result, the COCOMO II calculator tells us that the 2120 SLOC should have been done using an effort of 7.15 man-month

\newpage
\section{Comparing (Conclusions)}
Comparing the result given by the calculator and also mixing it with the data we were collecting during the project development, we got the following.


\begin{figure}[ht!]
	\begin{center}
		\includegraphics[width=17cm]{CC.png}
		\caption{COCOMO and Function Point analysis}
	\end{center}
\end{figure}

We documented 133 worked hours, that if we put it as a man-month we have 0,831. Looking the huge difference from what we documented and the numbers we got in function point (12,2) and COCOMO II (7,2) all we can conclude about is that we are really inexperts in approximation, is true that is a complicated process where you need to know your team in an excelent way and also have statistict of your own software development.\newline
Keeping to explain the differences obtained, we have to say that the assumption we did at the begining of just use the USC-COCOMO II calculator training data maybe is not wise, as we dont know this data and maybe here is a huge part of the gap in between the results.\newline
Also to note that our function points maybe are overrated, as the files (which are the things that adds more function points) that are really simple files, shouldnt be weighting that much. Also the definition of the problem with function points, we are sure that the statistics generated by the calculator are magnifying the software to develop, as MeteoCal was a quite small project, is not enough big to be predicted with this kind of tool. Also to remark that the calculator specs say that only works over 2000 SLOC, and our project is in the limit. Which leads to another possible problem about counting lines, we discarted many lines because of comments and obvious "no code" lines, but we are counting properties lines, and simple constructors, and also lot of code generated doing copy and paste, maybe this code should not be counted completely and our SLOC are less than we counted.\newline
Finally another possible mistake is the time marked in the development, as it was completely self measured, and sometimes you didn't count all the time you worked, because you stopped a bit for something like telephone calls, internet browsing, going to the restroom, eating, getting a coffee, things that in the real man-month are part of the paid hours.

\end{document}